home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / June 96 / Re ODF Popups.2 < prev    next >
Encoding:
Internet Message Format  |  1996-12-03  |  2.6 KB  |  [TEXT/ttxt]

  1. Subject:     Re: ODF Popups
  2. Sent:        6/12/96 9:49 AM
  3. Received:    6/12/96 10:12 AM
  4. From:        Laurent Delamare, laurentd@apple.com
  5. Reply-To:    ODF Interest, ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
  7.  
  8. >My resource looks like this:
  9. >
  10. >FW_RPopupMenu
  11. >(
  12. >  krInitialFont, // identifier
  13. >  { FW_FIX()...FW_FIX() }, // coordinates
  14. >  FW_kFixedBounds,
  15. >  FW_kPopupClickedMsg,
  16. >  FW_kFrameReceiver,
  17. >  0,
  18. >  krInitialMenu, // resource id
  19. >  0,
  20. >  1,
  21. >  4, // popupUseAddResMenu
  22. >  'FONT',
  23. >  GENEVA9, // font
  24. >  ""
  25. >)
  26. >
  27. >I want my popup to show all FONT's in my system. According to the 
  28. >comments in the ODF files and from what I know from Inside Macintosh  
  29. >this should work. But it doesn't. With this resource there is no popup 
  30. >at all in my view.
  31.  
  32. Your problem may come from the fact that you haven't defined a MENU
  33. resource with the id "krInitialMenu" in your part.  I just tried to
  34. modify ODF Form's Views.fr, putting 4 and 'FONT' in the first popup
  35. menu resource (kBrowseTimePopupID), and it does show the list of
  36. fonts in addition to the 4 menu items of MENU #1000.  
  37. So you must define at least an empty MENU resource otherwise the
  38. control manager doesn't create the popup.
  39.  
  40. > When I replace 4 and 'FONT' with 0 and 0 everything 
  41. >works ok. Where am I missing the point? 
  42.  
  43. What do you mean "everything works ok"?  You get your regular popup
  44. but not the fonts, right?
  45.  
  46. >Are there any good ODF-samples on how to do this? I know they 
  47. >exist in the OpenDoc samples, but I want to do it the ODF-way.
  48.  
  49. The only ODF 1 sample using popups is Form. The engineering note
  50. "Using Controls" and the file "FWViews.fr" mention the fact that
  51. one can use 'FONT' for the MenuRefCon attribute, but we could make
  52. things clearer.
  53.  
  54. >2)
  55. >For the menubar I can use a new resourcetype in an .fr file. Can we 
  56. >expect the same solution for popup menu's? Now we have to use 'MENU' 
  57. >resources and that seems to strictly Mac to me.
  58.  
  59. Yes this is a current restriction of FW_CPopupMenu views, you must
  60. define a Mac MENU resource.  We did it this way in ODF 1 because
  61. the Mac Control manager refuses to work if there is no MENU resource
  62. present in the shared library. 
  63. When we make ODF views work on Windows we'll use ODFRC menu resources
  64. and at that time we may update the Mac version (ODF will need to draw
  65. and handle popup menus by itself and not rely on the Control mgr).
  66.  
  67.  
  68. ______________________________________________________________________
  69. Laurent Delamare               laurentd@apple.com
  70. ODF Team                       http://www.devtools.apple.com/odf/
  71. Apple Computer, Inc.           http://www.opendoc.apple.com/
  72.